﻿@model IEnumerable<BankApp.Models.CurrentRate>

@{
    ViewBag.Title = "Current Rates";
    var grid = new WebGrid(
        source: Model,
        canPage: false);
}


<h2>Rates as of @DateTime.Today.ToString("MM/dd/yyyy"): </h2>

@if (!Model.Any())
{
    @Html.ValidationSummary()
}
else
{
    @grid.GetHtml(
        tableStyle: "grid",
        headerStyle: "header",
        rowStyle: "row",
        footerStyle: "footer",
        alternatingRowStyle: "row",
        columns: grid.Columns(
            grid.Column("Currency", "Currency", style: "textCol block"),
            grid.Column("NBRB", "NBRB", style: "textCol block"),
            grid.Column("Yahoo", "Yahoo", style: "textCol block"),
            grid.Column("ECB", "ECB", style: "textCol block"),
            grid.Column("FED", "FED", style: "textCol block"),
            grid.Column("Google", "Google", style: "textCol block")
            ))
}
